<?php

// +----------------------------------------------------------------------
// | 用户中心模块公共控制器
// +----------------------------------------------------------------------
// | Copyright (c) 2015-2024 http://www.yicmf.com, All rights reserved.
// +----------------------------------------------------------------------
// | Author: 微尘 <yicmf@qq.com>
// +----------------------------------------------------------------------

namespace app\controller\pos;

use app\common\controller\Base;
use app\common\middleware\UserAuth;
use app\common\middleware\UserSafe;
use app\model\ucenter\User as UserModel;

class Common extends Base
{


    protected $middleware = [
        UserSafe::class,
        UserAuth::class
    ];
    /**
     * 当前登录用户
     * @var UserModel
     */
    protected $user;
    protected $view_tpl_replace_string = [
        '__libs__' => '/static/im/libs',
        '__style__' => '/static/im/css',
        '__image__' => '/static/im/images',
        '__script__' => '/static/im/js',
        '__LAYUI__' => '/static/layui',
        '__IMG__' => '/static/im/images',
        '__MODS__' => '/static/im/mods',
        '__CSS__' => '/static/im/css',
        '__JS__' => '/static/im/js'
    ];

    protected function initialize()
    {
        parent::initialize();

        $this->user = $this->request->user;

        $this->assign('user', $this->user);
    }

}
